package com.biovr.backend.utils;

import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Created by monodev on 2017/4/28.
 */
@Data
public class RestResponse<T>{
    private boolean success;
    private String msg;
    private T data;

//    public RestResponse(boolean success, String msg, T returnObject) {
//        this.success = success;
//        this.msg = msg;
//        this.data = returnObject;
//    }
    private RestResponse() {}
    public static <T> RestResponse<T> newInstance() {
        return new RestResponse<T>();
    }

    @Override
    public String toString() {
        return "RestResult{" +
                "success=" + success +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }
}
